package com.cg.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/service02")
public class Service02Controller {

    @GetMapping("/getInfo/{userId}")
    public String getInfo(@PathVariable("userId") Integer userId) {
        if (userId == 1) {
            throw new RuntimeException("手动异常抛出");
        }
        return "获取service02接口信息";
    }

}
